<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>后台管理</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="lib/layui/css/layui.css" media="all">
		<link rel="stylesheet" href="css/admin.css" media="all">
	</head>
	<body>
        <div class="layui-fluid">
			<div class="layui-col-md12">
				<form class="layui-form layui-form-pane" action="" id="frm-reg" >
					<div class="layui-form-item">
						<label class="layui-form-label">帖子名</label>
						<!--<div class="layui-form-mid layui-word-aux">请输入角色名称</div>-->
						<div class="layui-input-inline layer-inputs">
							<input type="text" name="postName" id="postName"  placeholder="" class="layui-input" disabled="disabled">
						</div>

					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">用户名</label>
						<!--<div class="layui-form-mid layui-word-aux">请输入角色名称</div>-->
						<div class="layui-input-inline layer-inputs">
							<input type="text" name="userName" id="userName"  placeholder="" class="layui-input" disabled="disabled">
						</div>

					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">帖子类型</label>
						<!--<div class="layui-form-mid layui-word-aux">请输入角色名称</div>-->
						<div class="layui-input-inline layer-inputs">
							<input type="text" name="postType" id="postType"  placeholder="" class="layui-input" disabled="disabled">
						</div>

					</div>
					<!--<div class="layui-form-item">-->
						<!--<label class="layui-form-label">帖子配图</label>-->
						<!--&lt;!&ndash;<div class="layui-form-mid layui-word-aux">请输入角色名称</div>&ndash;&gt;-->
						<!--<div class="layui-input-inline layer-inputs" id="postPhoto">-->
                            <!--&lt;!&ndash;<img src="../images/2.jpg" alt="" style="height: 50px;width: 50px">&ndash;&gt;-->
							<!--&lt;!&ndash;<input type="image" name="postPhoto" id="postPhoto"  placeholder="" class="layui-input" disabled="disabled">&ndash;&gt;-->
						<!--</div>-->

					<!--</div>-->
					<div class="layui-form-item">
						<label class="layui-form-label">发帖时间</label>
						<!--<div class="layui-form-mid layui-word-aux">请输入角色名称</div>-->
						<div class="layui-input-inline layer-inputs">
							<input type="text" name="postTime" id="postTime"  placeholder="" class="layui-input" disabled="disabled">
						</div>

					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">帖子详情</label>
						<div id="postContent">

						</div>
						<!--<div class="layui-form-mid layui-word-aux">请输入角色名称</div>-->
						<!--<div class="layui-input-inline layer-inputs">-->
							<!--<input type="text" name="postContent" id="postContent"  placeholder="" class="layui-input" disabled="disabled">-->
						<!--</div>-->

					</div>

				</form>
			</div>
		</div>	
    </body>
</html>
<script src="js/jquery-3.4.1.min.js"></script>
<script src="lib/layui/layui.js"></script>
<script src="js/admin.js"></script>
<script>
	var user = window.location.href.split("?")[1].split("=")[1];
	console.log(user);
    var parmeter = "postId=" + user;
    $.ajax({
        url:"/forum/post/selectByPostTestId",
        data:parmeter,
        type:"post",
        dataType:"json",
        success:function (data) {
            // var html = "<img src=\"" + data.postPhoto + "\" alt=\"\" style=\"height: 50px;width: 50px\">"
            // $("#postPhoto").html(html);
            $("#postName").val(data.postName);
            $("#userName").val(data.userName);
            $("#postType").val(data.postType);
			$("#postContent").html(data.postContent);
            $("#postTime").val(data.postTime);
        }

    })
</script>